package org.nepu.scr.indexrate.raterisk;

import lombok.AllArgsConstructor;
import lombok.SneakyThrows;
import lombok.extern.slf4j.Slf4j;
import org.nepu.scr.indexrate.raterisk.prerisk.params.RiskData;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@AllArgsConstructor
public class RiskDataService {
    @SneakyThrows
    public void setData (RiskData data, String result, String target){
        switch (target) {
            case "B": data.setB(result);break;
            case "B1": data.setB1(result);break;
            case "B2": data.setB2(result);break;
            case "B3": data.setB3(result);break;
            case "B4": data.setB4(result);break;
            case "B5": data.setB5(result);break;
            case "B21": data.setB21(result);break;
            case "B22": data.setB22(result);break;
            case "B23": data.setB23(result);break;
            case "B41": data.setB41(result);break;
            case "B42": data.setB42(result);break;
            case "B43": data.setB43(result);break;
            case "B44": data.setB44(result);break;
            case "B45": data.setB45(result);break;
            case "B46": data.setB46(result);break;
            case "B47": data.setB47(result);break;
            case "B48": data.setB48(result);break;
            case "B49": data.setB49(result);break;
            case "B4a": data.setB4a(result);break;
            case "B4b": data.setB4b(result);break;
            case "B4c": data.setB4c(result);break;
            case "B221": data.setB221(result);break;
            case "B222": data.setB222(result);break;
            case "B223": data.setB223(result);break;
            case "B224": data.setB224(result);break;
            case "B225": data.setB225(result);break;
            case "B226": data.setB226(result);break;
            case "B227": data.setB227(result);break;
            case "B228": data.setB228(result);break;
            case "B229": data.setB229(result);break;
            case "B22a": data.setB22a(result);break;
            case "B22b": data.setB22b(result);break;
            case "B22c": data.setB22c(result);break;
            case "B22d": data.setB22d(result);break;
            case "B22e": data.setB22e(result);break;
            case "B22f": data.setB22f(result);break;
            case "B22g": data.setB22g(result);break;
            case "B22h": data.setB22h(result);break;
            case "B231": data.setB231(result);break;
            case "B232": data.setB232(result);break;
            case "B233": data.setB233(result);break;
            case "B234": data.setB234(result);break;
            case "B235": data.setB235(result);break;
            case "B236": data.setB236(result);break;
            default: break;
        }
    }
}
